package com.xiaoquan.graphql.resolver;

import com.coxautodev.graphql.tools.GraphQLResolver;
import com.xiaoquan.graphql.entity.Author;
import com.xiaoquan.graphql.entity.Book;

public class BookResolver implements GraphQLResolver<Book> {


    public Author getAuthor(Book book) {
        Author author = new Author();
        author.setFirstName("firstName-" + book.getTitle());
        author.setLastName("lastName-" + book.getTitle());
        return author;
    }
}
